package com.imooc.pojo.mo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

/**
 * 友情链接，MongoDB存储对象
 */
@Data
@Document(collation = "FriendLink")
public class FriendLinkMO {

    /**
     * 这里如果我们自己写入id，那么MongoDB就不会为我们生成id
     */
    @Id
    private String id;

    @Field("link_name")
    private String linkName;

    @Field("link_url")
    private String linkUrl;

    @Field("is_delete")
    private Integer isDelete;

    @Field("create_time")
    private Date createTime;

    @Field("update_time")
    private Date updateTime;

}